/**
 * 
 */
package com.yjd.bi.etl.sql.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * @author renbangjie
 * 
 */
public enum RechChannel {

	PC(1, "PayAuth", "/Funds/data?type=1", "pc"),
	ANDROID(2, "PayAuthWap", "/rechreturnurl/index/platform/android", "android"),
	IOS(3, "PayAuthWap", "/rechreturnurl/index/platform/ios", "ios"),
	WAP(4, "PayAuthWap", "/funds/Notes", "wap"),
	BANKPAY(5, "BankPay", "/Funds/index?type=1", "bank_pc"),//存管用户网银支付
	BANKPAYAUTH(6, "BankPayAuth", "/Funds/index?type=1", "bank_pc_auth"),//存管用户PC认证支付
	BANKPAYAUTH_WAP(7, "BankPayAuthWap", "/funds/depoNotes", "bank_wap"),//存管用户微站端认证支付
	BANKPAYAUTH_IOS(8, "BankPayAuthWap", "/rechreturnurl/index/platform/ios", "bank_ios"),//存管用户ios端认证支付
	BANKPAYAUTH_ANDROID(9, "BankPayAuthWap", "/rechreturnurl/index/platform/android", "bank_android"),//存管用户android端认证支付
	WEIXIN(10, "PayAuthWap", "/funds/Notes", "weixin"), // 微信（普通用户）
	BANK_WEIXIN(11, "BankPayAuthWap", "/funds/depoNotes", "bank_weixin") // 微信（存管用户）
	;


	private int code;
	private String appType;
	private String pageUrl;
	private String lable;

	private RechChannel(int code, String appType, String pageUrl, String lable) {
		this.code = code;
		this.appType = appType;
		this.pageUrl = pageUrl;
		this.lable = lable;
	}

	public static com.yjd.comm.pay.enums.RechChannel getChannel(String lable) {
		com.yjd.comm.pay.enums.RechChannel[] channels = com.yjd.comm.pay.enums.RechChannel.values();
		for (com.yjd.comm.pay.enums.RechChannel c : channels) {
			if (StringUtils.isNotBlank(lable)
					&& lable.equalsIgnoreCase(c.getLable())) {
				return c;
			}
		}
		return com.yjd.comm.pay.enums.RechChannel.PC;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getLable() {
		return lable;
	}

	public void setLable(String lable) {
		this.lable = lable;
	}

	public String getAppType() {
		return appType;
	}

	public void setAppType(String appType) {
		this.appType = appType;
	}

	public String getPageUrl() {
		return pageUrl;
	}

	public void setPageUrl(String pageUrl) {
		this.pageUrl = pageUrl;
	}
}
